﻿using Orders.Api.Models;
using Orders.Application.Data.Entities;

namespace Orders.Api.Infrastructure
{
    public static class Extensions
    {
        public static Order ToOrder(this OrderModel model)
        {
            return new Order 
            {
                Comments = model.Comments,
                CreatedAt=DateTime.UtcNow,
                Total=model.Total
            };
        }
    }
}
